We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Session with memcached cant destroy with: $this->session->destroy();

Hi, i configure my boostrap with memcached session adapter:

    $di->setShared('session', function() {
    $session = new Phalcon\Session\Adapter\Memcache(array(
        'host' => '127.0.0.1', // mandatory
        'port' => 11211, // optional (standard: 11211)
        'lifetime' => 8600, // optional (standard: 8600)
        'prefix' => SITE_DOMAIN, // optional (standard: [empty_string]), means memcache key is my-app_31231jkfsdfdsfds3
        'persistent' => false            // optional (standard: false)
    ));
    $session->start();
    return $session;
});

and save:

    $this->session->set(self::BTS_SESSION_USER_NAME, $o_user->getUsername());
    $this->session->set(self::BTS_SESSION_GROUP_ID, $o_user->BtsGroup->idGroup);

But when i want to delete all session store:

    $this->session->destroy();

And verifie if the session destroy with:

   var_dump($this->session->has(self::BTS_SESSION_USER_NAME));

The response is: bool(true) , Or:

var_dump($this->session->get(self::BTS_SESSION_USER_NAME));

The response is: value_save_string

Help!